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;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA;;;;;;;ACAA","sources":["webpack://quran.com/src/pages/surah-info/[chapterId].tsx","webpack://quran.com/sentry-wrapper-module","webpack://quran.com/external commonjs \"@reduxjs/toolkit\"","webpack://quran.com/external commonjs \"@sentry/nextjs\"","webpack://quran.com/external commonjs \"classnames\"","webpack://quran.com/external commonjs \"humps\"","webpack://quran.com/external commonjs \"lodash/findKey\"","webpack://quran.com/external commonjs \"lodash/groupBy\"","webpack://quran.com/external commonjs \"lodash/random\"","webpack://quran.com/external commonjs \"lodash/range\"","webpack://quran.com/external commonjs \"next-seo\"","webpack://quran.com/external commonjs \"next-translate/useTranslation\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/app-router-context.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/head-manager-context.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/head.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/i18n/detect-domain-locale.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/i18n/normalize-locale-path.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/image-config-context.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/image-config.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/is-plain-object.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/mitt.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/page-path/denormalize-page-path.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/router-context.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/router/utils/add-locale.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/router/utils/add-path-prefix.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/router/utils/compare-states.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/router/utils/format-next-pathname-info.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/router/utils/format-url.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/router/utils/get-asset-path-from-route.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/router/utils/get-next-pathname-info.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/router/utils/is-bot.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/router/utils/is-dynamic.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/router/utils/parse-path.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/router/utils/parse-relative-url.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/router/utils/path-has-prefix.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/router/utils/querystring.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/router/utils/remove-trailing-slash.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/router/utils/resolve-rewrites.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/router/utils/route-matcher.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/router/utils/route-regex.js\"","webpack://quran.com/external commonjs \"next/dist/shared/lib/utils.js\"","webpack://quran.com/external commonjs \"next/router\"","webpack://quran.com/external commonjs \"react\"","webpack://quran.com/external commonjs \"react/jsx-runtime\"","webpack://quran.com/external module \"@radix-ui/react-tooltip\"","webpack://quran.com/external module \"firebase/compat/analytics\"","webpack://quran.com/external module \"firebase/compat/app\"","webpack://quran.com/external node-commonjs \"querystring\""],"sourcesContent":["import { GetStaticPaths, GetStaticProps, NextPage } from 'next';\n\nimport InfoPage from '@/components/chapters/Info/InfoPage';\nimport { getChapterData, getAllChaptersData } from '@/utils/chapter';\nimport {\n REVALIDATION_PERIOD_ON_ERROR_SECONDS,\n ONE_MONTH_REVALIDATION_PERIOD_SECONDS,\n} from '@/utils/staticPageGeneration';\nimport { isValidChapterId } from '@/utils/validator';\nimport { getChapterIdBySlug, getChapterInfo } from 'src/api';\nimport { ChapterInfoResponse, ChapterResponse } from 'types/ApiResponses';\nimport ChaptersData from 'types/ChaptersData';\n\ninterface Props {\n chapterResponse?: ChapterResponse;\n chapterInfoResponse?: ChapterInfoResponse;\n hasError?: boolean;\n chaptersData: ChaptersData;\n}\n\nconst ChapterInfo: NextPage = (props) => {\n return ;\n};\n\nexport const getStaticProps: GetStaticProps = async ({ params, locale }) => {\n let chapterIdOrSlug = String(params.chapterId);\n // we need to validate the chapterId first to save calling BE since we haven't set the valid paths inside getStaticPaths to avoid pre-rendering them at build time.\n if (!isValidChapterId(chapterIdOrSlug)) {\n const sluggedChapterId = await getChapterIdBySlug(chapterIdOrSlug, locale);\n // if it's not a valid slug\n if (!sluggedChapterId) {\n return { notFound: true };\n }\n chapterIdOrSlug = sluggedChapterId;\n }\n const chaptersData = await getAllChaptersData(locale);\n try {\n const chapterInfoResponse = await getChapterInfo(chapterIdOrSlug, locale);\n return {\n props: {\n chaptersData,\n chapterInfoResponse,\n chapterResponse: { chapter: getChapterData(chaptersData, chapterIdOrSlug) },\n },\n revalidate: ONE_MONTH_REVALIDATION_PERIOD_SECONDS, // chapter info will be generated at runtime if not found in the cache, then cached for subsequent requests for 30 days.\n };\n } catch (error) {\n return {\n props: { hasError: true },\n revalidate: REVALIDATION_PERIOD_ON_ERROR_SECONDS, // 35 seconds will be enough time before we re-try generating the page again.\n };\n }\n};\n\nexport const getStaticPaths: GetStaticPaths = async () => ({\n paths: [], // no pre-rendered chapters at build time.\n fallback: 'blocking', // will server-render pages on-demand if the path doesn't exist.\n});\n\nexport default ChapterInfo;\n","import * as Sentry from '@sentry/nextjs';\nimport * as serverComponentModule from '__SENTRY_WRAPPING_TARGET_FILE__.cjs';\nexport * from '__SENTRY_WRAPPING_TARGET_FILE__.cjs';\n\n/*\n * This file is a template for the code which will be substituted when our webpack loader handles non-API files in the\n * `pages/` directory.\n *\n * We use `__SENTRY_WRAPPING_TARGET_FILE__.cjs` as a placeholder for the path to the file being wrapped. Because it's not a real package,\n * this causes both TS and ESLint to complain, hence the pragma comments below.\n */\n\nconst userPageModule = serverComponentModule ;\n\nconst pageComponent = userPageModule ? userPageModule.default : undefined;\n\nconst origGetInitialProps = pageComponent ? pageComponent.getInitialProps : undefined;\nconst origGetStaticProps = userPageModule ? userPageModule.getStaticProps : undefined;\nconst origGetServerSideProps = userPageModule ? userPageModule.getServerSideProps : undefined;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst getInitialPropsWrappers = {\n '/_app': Sentry.wrapAppGetInitialPropsWithSentry,\n '/_document': Sentry.wrapDocumentGetInitialPropsWithSentry,\n '/_error': Sentry.wrapErrorGetInitialPropsWithSentry,\n};\n\nconst getInitialPropsWrapper = getInitialPropsWrappers['/surah-info/[chapterId]'] || Sentry.wrapGetInitialPropsWithSentry;\n\nif (pageComponent && typeof origGetInitialProps === 'function') {\n pageComponent.getInitialProps = getInitialPropsWrapper(origGetInitialProps) ;\n}\n\nconst getStaticProps =\n typeof origGetStaticProps === 'function'\n ? Sentry.wrapGetStaticPropsWithSentry(origGetStaticProps, '/surah-info/[chapterId]')\n : undefined;\nconst getServerSideProps =\n typeof origGetServerSideProps === 'function'\n ? Sentry.wrapGetServerSidePropsWithSentry(origGetServerSideProps, '/surah-info/[chapterId]')\n : undefined;\n\nconst pageWrapperTemplate = pageComponent ? Sentry.wrapPageComponentWithSentry(pageComponent ) : pageComponent;\n\nexport { pageWrapperTemplate as default, getServerSideProps, getStaticProps };\n","module.exports = require(\"@reduxjs/toolkit\");","module.exports = require(\"@sentry/nextjs\");","module.exports = require(\"classnames\");","module.exports = require(\"humps\");","module.exports = require(\"lodash/findKey\");","module.exports = require(\"lodash/groupBy\");","module.exports = require(\"lodash/random\");","module.exports = require(\"lodash/range\");","module.exports = require(\"next-seo\");","module.exports = require(\"next-translate/useTranslation\");","module.exports = require(\"next/dist/shared/lib/app-router-context.js\");","module.exports = require(\"next/dist/shared/lib/head-manager-context.js\");","module.exports = require(\"next/dist/shared/lib/head.js\");","module.exports = require(\"next/dist/shared/lib/i18n/detect-domain-locale.js\");","module.exports = require(\"next/dist/shared/lib/i18n/normalize-locale-path.js\");","module.exports = require(\"next/dist/shared/lib/image-config-context.js\");","module.exports = require(\"next/dist/shared/lib/image-config.js\");","module.exports = require(\"next/dist/shared/lib/is-plain-object.js\");","module.exports = require(\"next/dist/shared/lib/mitt.js\");","module.exports = require(\"next/dist/shared/lib/page-path/denormalize-page-path.js\");","module.exports = require(\"next/dist/shared/lib/router-context.js\");","module.exports = require(\"next/dist/shared/lib/router/utils/add-locale.js\");","module.exports = require(\"next/dist/shared/lib/router/utils/add-path-prefix.js\");","module.exports = require(\"next/dist/shared/lib/router/utils/compare-states.js\");","module.exports = require(\"next/dist/shared/lib/router/utils/format-next-pathname-info.js\");","module.exports = require(\"next/dist/shared/lib/router/utils/format-url.js\");","module.exports = require(\"next/dist/shared/lib/router/utils/get-asset-path-from-route.js\");","module.exports = require(\"next/dist/shared/lib/router/utils/get-next-pathname-info.js\");","module.exports = require(\"next/dist/shared/lib/router/utils/is-bot.js\");","module.exports = require(\"next/dist/shared/lib/router/utils/is-dynamic.js\");","module.exports = require(\"next/dist/shared/lib/router/utils/parse-path.js\");","module.exports = require(\"next/dist/shared/lib/router/utils/parse-relative-url.js\");","module.exports = require(\"next/dist/shared/lib/router/utils/path-has-prefix.js\");","module.exports = require(\"next/dist/shared/lib/router/utils/querystring.js\");","module.exports = require(\"next/dist/shared/lib/router/utils/remove-trailing-slash.js\");","module.exports = require(\"next/dist/shared/lib/router/utils/resolve-rewrites.js\");","module.exports = require(\"next/dist/shared/lib/router/utils/route-matcher.js\");","module.exports = require(\"next/dist/shared/lib/router/utils/route-regex.js\");","module.exports = require(\"next/dist/shared/lib/utils.js\");","module.exports = require(\"next/router\");","module.exports = require(\"react\");","module.exports = require(\"react/jsx-runtime\");","module.exports = import(\"@radix-ui/react-tooltip\");;","module.exports = import(\"firebase/compat/analytics\");;","module.exports = import(\"firebase/compat/app\");;","module.exports = require(\"querystring\");"],"names":["ChapterInfo","props","_jsx","InfoPage","getStaticProps","params","locale","chapterIdOrSlug","String","chapterId","isValidChapterId","sluggedChapterId","getChapterIdBySlug","notFound","chaptersData","getAllChaptersData","chapterInfoResponse","getChapterInfo","chapterResponse","chapter","getChapterData","revalidate","ONE_MONTH_REVALIDATION_PERIOD_SECONDS","error","hasError","REVALIDATION_PERIOD_ON_ERROR_SECONDS","getStaticPaths","paths","fallback"],"sourceRoot":""}